<?php
class Tracking_model extends CI_Model{
	
	function __construct(){
		parent::__construct();	
	}

	function cek_spb($nospb){

		
		$this->db->select("ifnull(status_verifikasi,'') status_verifikasi, ifnull(status_penguji,'') status_penguji,  
ifnull(spm_bendahara,'') spm_bendahara,ifnull(s.tanda_id,0) tanda_terima,s.log_insert, t.log_insert as tgl_terima,ifnull(st.tanggal,'') as status_serah,ifnull(tr.tanggal,'') as status_terima,ifnull(spm_bendahara,'') as ls_up",false);
		$this->db->from("tbl_spb s  left join tbl_tanda_terima t on t.tanda_id =s.tanda_id left join tbl_serahterima_ppk st ON s.ppk_serah_id=st.serahterima_id left join tbl_serahterima_ppk tr ON s.ppk_terima_id=tr.serahterima_id",false);
		
		$this->db->where('s.nomor', $nospb);
	
		$query = $this->db->get();
        return $query;
		  
	}
	
	
}
?>